﻿<%@  Page Language="C#"  MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<cludg.Web.ViewModels.PersonalInfoModel>" %>
<%@ Import Namespace="cludg.Web.Core.RenderHelpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Редактирование профиля
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SecondLevelMenu" runat="server">
	<%: Html.Menu(Model.EditUserMenu)%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>Персональная информация</h2>
	<% Html.EnableClientValidation(); %>
	<% using (Html.BeginForm("EditPersonalInfo", "Account", FormMethod.Post , new Dictionary<string, object> { { "enctype", "multipart/form-data" } }))
	{%>
	<%: Html.ValidationSummary(true) %>
	<fieldset>
		<div class="editor-label">
			<%: Html.LabelFor(model => model.DisplayName) %>
		</div>
		<div class="editor-field">
			<%: Html.TextBoxFor(model => model.DisplayName)%>
			<%: Html.ValidationMessageFor(model => model.DisplayName)%>
		</div>
<%--		<div class="editor-label">
			<%: Html.LabelFor(model => model.DateOfBirth) %>
		</div>
		<div class="editor-field">
			<%: Html.TextBoxFor(model => model.DateOfBirth, Html.RenderDateTime(Model.DateOfBirth)) %>
			<%: Html.ValidationMessageFor(model => model.DateOfBirth) %>
		</div>
		<div class="editor-label">
			<%: Html.LabelFor(model => model.Location) %>
		</div>
		<div class="editor-field">
			<%: Html.TextBoxFor(model => model.Location) %>
			<%: Html.ValidationMessageFor(model => model.Location) %>
		</div>
--%>		<div>
			<%: Html.RenderImage(Model.Avatar) %>
		</div>
		<div class="editor-label">
			<%: Html.LabelFor(model => model.NewAvatar) %>
		</div>
		<div>
			<input type="file" id="fileUpload" name="<%: Model.AvatarUploadFileName %>"/>
		</div>
		<div class="editor-label">
<%--			<input type="checkbox" id="DeleteAvatar" <%: Model.DeleteAvatar ? "\"checked\"=\"checked\"" : "" %> name="DeleteAvatar" value="true" />
			<input name="DeleteAvatar" type="hidden" value="false" />
--%>	
			<%: Html.MyCheckBoxFor(model => model.DeleteAvatar)%>
			<%: Html.LabelFor(model => model.DeleteAvatar) %>
		</div>
		<p>
			<input type="submit" value="сохранить" />
		</p>
	</fieldset>
	<% } %>
</asp:Content>
